package com.siki.controller;

import com.siki.config.filterConfig.jwtConfig.annotation.UserLoginToken;
import com.siki.pojo.enumeration.common.*;
import com.siki.utils.EnumUtils;
import com.siki.utils.JsonInfoReturn;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "枚举字段数据映射相关接口")
@RequestMapping("/api/vi/siki/enum")
@CrossOrigin
public class EnumController {

    @ApiOperation(value = "[枚举字段数据映射] - 【性别】",consumes = "application/json",httpMethod = "GET")
    @GetMapping("/user_sex")
    public JsonInfoReturn getUserSex(){
        return JsonInfoReturn.success(EnumUtils.getEnumTypeJsonArray(UserSex.class));
    }

    @ApiOperation(value = "[枚举字段数据映射] - 【学历】",consumes = "application/json",httpMethod = "GET")
    @GetMapping("/education_claim")
    public JsonInfoReturn getEducationClaim(){
        return JsonInfoReturn.success(EnumUtils.getEnumTypeJsonArray(EducationClaim.class));
    }

    @ApiOperation(value = "[枚举字段数据映射] - 【职业意向】",consumes = "application/json",httpMethod = "GET")
    @GetMapping("/position_category")
    public JsonInfoReturn getPositionCategory(){
        return JsonInfoReturn.success(EnumUtils.getEnumTypeJsonArray(PositionCategory.class));
    }

    @ApiOperation(value = "[枚举字段数据映射] - 【账号状态】",consumes = "application/json",httpMethod = "GET")
    @GetMapping("/audit_status")
    public JsonInfoReturn getAuditStatus(){
        return JsonInfoReturn.success(EnumUtils.getEnumTypeJsonArray(AuditStatus.class));
    }

    @ApiOperation(value = "[枚举字段数据映射] - 【账号身份】",consumes = "application/json",httpMethod = "GET")
    @GetMapping("/user_role")
    public JsonInfoReturn getUserRole(){
        return JsonInfoReturn.success(EnumUtils.getEnumTypeJsonArray(UserRole.class));
    }
}
